/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.com.compassion.entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/** Clase entidad para el mapeo de tabla de base de datos Biblias
* @author grupo de Tesis
*/
@Entity
@Table(name = "biblias")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Biblias.findAll", query = "SELECT b FROM Biblias b"),
    @NamedQuery(name = "Biblias.findByIdBiblia", query = "SELECT b FROM Biblias b WHERE b.idBiblia = :idBiblia"),
    @NamedQuery(name = "Biblias.findByFecBiblia", query = "SELECT b FROM Biblias b WHERE b.fecBiblia = :fecBiblia"),
    @NamedQuery(name = "Biblias.findByCantBiblia", query = "SELECT b FROM Biblias b WHERE b.cantBiblia = :cantBiblia"),
    @NamedQuery(name = "Biblias.findByEstBiblia", query = "SELECT b FROM Biblias b WHERE b.estBiblia = :estBiblia"),
    @NamedQuery(name = "Biblias.findByAuAddUsr", query = "SELECT b FROM Biblias b WHERE b.auAddUsr = :auAddUsr"),
    @NamedQuery(name = "Biblias.findByAuAddDat", query = "SELECT b FROM Biblias b WHERE b.auAddDat = :auAddDat"),
    @NamedQuery(name = "Biblias.findByAuModUsr", query = "SELECT b FROM Biblias b WHERE b.auModUsr = :auModUsr"),
    @NamedQuery(name = "Biblias.findByAuModDat", query = "SELECT b FROM Biblias b WHERE b.auModDat = :auModDat")})
public class Biblias implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idBiblia")
    private Integer idBiblia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecBiblia")
    @Temporal(TemporalType.DATE)
    private Date fecBiblia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cantBiblia")
    private int cantBiblia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "estBiblia")
    private int estBiblia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddUsr")
    private int auAddUsr;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddDat")
    @Temporal(TemporalType.DATE)
    private Date auAddDat;
    @Column(name = "AuModUsr")
    private Integer auModUsr;
    @Column(name = "AuModDat")
    @Temporal(TemporalType.DATE)
    private Date auModDat;
    @JoinColumn(name = "idBeneficiario", referencedColumnName = "idBeneficiario")
    @ManyToOne(optional = false)
    private Beneficiario idBeneficiario;

    public Biblias() {
    }

    public Biblias(Integer idBiblia) {
        this.idBiblia = idBiblia;
    }

    public Biblias(Integer idBiblia, Date fecBiblia, int cantBiblia, int estBiblia, int auAddUsr, Date auAddDat) {
        this.idBiblia = idBiblia;
        this.fecBiblia = fecBiblia;
        this.cantBiblia = cantBiblia;
        this.estBiblia = estBiblia;
        this.auAddUsr = auAddUsr;
        this.auAddDat = auAddDat;
    }

    public Integer getIdBiblia() {
        return idBiblia;
    }

    public void setIdBiblia(Integer idBiblia) {
        this.idBiblia = idBiblia;
    }

    public Date getFecBiblia() {
        return fecBiblia;
    }

    public void setFecBiblia(Date fecBiblia) {
        this.fecBiblia = fecBiblia;
    }

    public int getCantBiblia() {
        return cantBiblia;
    }

    public void setCantBiblia(int cantBiblia) {
        this.cantBiblia = cantBiblia;
    }

    public int getEstBiblia() {
        return estBiblia;
    }

    public void setEstBiblia(int estBiblia) {
        this.estBiblia = estBiblia;
    }

    public int getAuAddUsr() {
        return auAddUsr;
    }

    public void setAuAddUsr(int auAddUsr) {
        this.auAddUsr = auAddUsr;
    }

    public Date getAuAddDat() {
        return auAddDat;
    }

    public void setAuAddDat(Date auAddDat) {
        this.auAddDat = auAddDat;
    }

    public Integer getAuModUsr() {
        return auModUsr;
    }

    public void setAuModUsr(Integer auModUsr) {
        this.auModUsr = auModUsr;
    }

    public Date getAuModDat() {
        return auModDat;
    }

    public void setAuModDat(Date auModDat) {
        this.auModDat = auModDat;
    }

    public Beneficiario getIdBeneficiario() {
        return idBeneficiario;
    }

    public void setIdBeneficiario(Beneficiario idBeneficiario) {
        this.idBeneficiario = idBeneficiario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idBiblia != null ? idBiblia.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Biblias)) {
            return false;
        }
        Biblias other = (Biblias) object;
        if ((this.idBiblia == null && other.idBiblia != null) || (this.idBiblia != null && !this.idBiblia.equals(other.idBiblia))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sv.com.compassion.entidades.Biblias[ idBiblia=" + idBiblia + " ]";
    }
    
}
